/*     */ package com.qmsk.business.info.taskRemind.dao;
/*     */ 
/*     */ import com.qmsk.business.sys.basic.SupportDAO;
/*     */ import com.utils.gson.in.GsonHeadManyRows;
/*     */ import com.utils.gson.out.GsonEbRst;
/*     */ import java.sql.SQLException;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class TaskRemindDao extends SupportDAO
/*     */ {
/*     */   private int insertBirthDay(Integer remindId, Integer remindDay)
/*     */     throws SQLException
/*     */   {
/*  15 */     Object[] params = { remindId, remindDay };
/*  16 */     return update("insertBirthDay", params);
/*     */   }
/*     */ 
/*     */   private int insertMaintenanceRmind(Integer remindId, Integer remindDay) throws SQLException
/*     */   {
/*  21 */     Object[] params = { remindId, remindDay, remindDay };
/*  22 */     return update("insertMaintenanceRmind", params);
/*     */   }
/*     */ 
/*     */   private int insertRenewalRmind(Integer remindId, Integer remindDay) throws SQLException
/*     */   {
/*  27 */     Object[] params = { remindId, remindDay, remindDay };
/*  28 */     return update("insertRenewalRmind", params);
/*     */   }
/*     */ 
/*     */   private int insertCylinderTest(Integer remindId, Integer remindDay) throws SQLException
/*     */   {
/*  33 */     Object[] params = { remindId, remindDay, remindDay };
/*  34 */     return update("insertCylinderTest", params);
/*     */   }
/*     */ 
/*     */   private int insertLisenceExmiTion(Integer remindId, Integer remindDay) throws SQLException
/*     */   {
/*  39 */     Object[] params = { remindId, remindDay, remindDay };
/*  40 */     return update("insertLisenceExmiTion", params);
/*     */   }
/*     */ 
/*     */   private int insertMemberExpires(Integer remindId, Integer remindDay) throws SQLException
/*     */   {
/*  45 */     Object[] params = { remindId, remindDay, remindDay };
/*  46 */     return update("insertMemberExpires", params);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getListOpt(Map<String, Object> params, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  51 */     return getGsonOfParams("selectSqlOpt", "selectCountOpt", 
/*  52 */       "selectJsonOpt", params, nPageIdx, nPageSize);
/*     */   }
/*     */ 
/*     */   public int insertTask(Integer remindId, Integer remindDay) throws SQLException
/*     */   {
/*  57 */     int rslt = 0;
/*  58 */     if (remindId.intValue() == 1)
/*  59 */       rslt = insertBirthDay(remindId, remindDay);
/*  60 */     else if (remindId.intValue() == 2)
/*  61 */       rslt = insertMemberExpires(remindId, remindDay);
/*  62 */     else if (remindId.intValue() == 3)
/*  63 */       rslt = insertLisenceExmiTion(remindId, remindDay);
/*  64 */     else if (remindId.intValue() == 4)
/*  65 */       rslt = insertCylinderTest(remindId, remindDay);
/*  66 */     else if (remindId.intValue() == 5)
/*  67 */       rslt = insertRenewalRmind(remindId, remindDay);
/*  68 */     else if (remindId.intValue() == 6) {
/*  69 */       rslt = insertMaintenanceRmind(remindId, remindDay);
/*     */     }
/*  71 */     return rslt;
/*     */   }
/*     */ 
/*     */   public GsonHeadManyRows getListOptOfSend(Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  76 */     Object[] params = new Object[0];
/*  77 */     return getManyRowsOfParams("selectSqlOfSend", "selectJsonOfSend", params);
/*     */   }
/*     */ 
/*     */   public int updateTelOfSend(int status, Long id) throws SQLException {
/*  81 */     Map params = new HashMap();
/*  82 */     params.put("id", id);
/*  83 */     params.put("status", Integer.valueOf(status));
/*  84 */     return update("updateTelOfId", params);
/*     */   }
/*     */ 
/*     */   public int updateAppOfSend(int status, Long id) throws SQLException {
/*  88 */     Map params = new HashMap();
/*  89 */     params.put("id", id);
/*  90 */     params.put("status", Integer.valueOf(status));
/*  91 */     return update("updateAppOfId", params);
/*     */   }
/*     */ 
/*     */   public int updateSmsOfSend(int status, Long id) throws SQLException {
/*  95 */     Map params = new HashMap();
/*  96 */     params.put("id", id);
/*  97 */     params.put("status", Integer.valueOf(status));
/*  98 */     return update("updateSmsOfId", params);
/*     */   }
/*     */ 
/*     */   public long queryCount() throws SQLException {
/* 102 */     Map params = new HashMap();
/* 103 */     return queryForLong("selectCountOfSend", params, Long.valueOf(0L)).longValue();
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.info.taskRemind.dao.TaskRemindDao
 * JD-Core Version:    0.5.3
 */